Expand description
coe-rs
is a Rust library for coercing a value of a given type into the same type, in cases
where the compiler can’t prove the two types are equal.
This can be used to emulate specialization in to a limited extent.
Traits
- Trait for performing coercion from one type to another, where the types are identical but the compiler can’t prove it.
Functions
- Checks if
T
andU
are the same type, and panics if that’s not the case. - Free function that defers to the
Coerce
trait implementation. - Similar to
coerce
but operates on any lifetime-free type. - Returns
true
ifT
andU
are the same type.